import Vue from 'vue'
import Router from 'vue-router'
import App from '../App'
//tabbar底部四个页面
import Index from '../Pages/Index'
import Course from '../Pages/Course'
import Classroom from '../Pages/Classroom'
import My from '../Pages/My'
//登入,重置密码,手机号快捷登入页面
import Login from '../Pages/Login'
import ResetPassword from '../Pages/ResetPassword'
import PhoneFastLogin from '../Pages/PhoneFastLogin'
//子页面详细页面
import Detail from '../Pages/subpages/Detail'
import LightLesson from '../Pages/subpages/LightLesson'
import Tutorial from '../Pages/subpages/Tutorial'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/index',
      meta:{
        show:1      //1只显示tabbar
      }
    },
    {
      path: '/index',
      name: 'index',
      component: Index,
      meta:{
        show:1
      }
    },
    {
      path: '/course',
      name: 'course',
      component: Course,
      meta:{
        show:1
      }
    },
    {
      path: '/classroom',
      name: 'classroom',
      component: Classroom,
      meta:{
        show:1
      }
    },
    {
      path: '/my',
      name: 'my',
      component: My,
      meta:{
        show:1
      }
    },
    {
      path: '/detail',
      name: 'detail',
      component: Detail,
      meta:{
        show:2        //2只显示领取优惠券按钮
      }
    },
    {
      path: '/lightlesson',
      name: 'lightlesson',
      component: LightLesson,
      meta:{
        show:3        //3什么都不显示
      }
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
      meta:{
        show:3      //3什么都不显示
      }
    },
    {
      path: '/resetpass',
      name: 'resetpass',
      component: ResetPassword,
      meta:{
        show:3      //3什么都不显示
      }
    },
    {
      path: '/phonefast',
      name: 'phonefast',
      component: PhoneFastLogin,
      meta:{
        show:3      //3什么都不显示
      }
    },{
      path: '/tutorial',
      name: 'tutorial',
      component: Tutorial,
      meta:{
        show:4      //显示黄色立即购买
      }
    }

  ]
})
